<?php

require 'database.php';



$__CONFIG__=file_get_contents('config/config.json');
$__CONFIG__=json_decode($__CONFIG__,1);


$__CONFIG__["web_status"]       =(int)$_POST["web_status"];
$__CONFIG__["web_name"]         =$_POST["web_name"];
$__CONFIG__["web_logo"]         =$_POST["web_logo"];
$__CONFIG__["web_ico"]          =$_POST["web_ico"];
$__CONFIG__["web_basehost"]     =$_POST["web_basehost"];
$__CONFIG__["web_title"]        =$_POST["web_title"];
$__CONFIG__["web_keywords"]     =$_POST["web_keywords"];
$__CONFIG__["web_description"]  =$_POST["web_description"];
$__CONFIG__["web_copyright"]    =$_POST["web_copyright"];
$__CONFIG__["web_recordnum"]    =$_POST["web_recordnum"];
$__CONFIG__["web_garecordnum"]  =$_POST["web_garecordnum"];
$__CONFIG__["web_thirdcode_pc"] =$_POST["web_thirdcode_pc"];
$__CONFIG__["web_thirdcode_wap"]=$_POST["web_thirdcode_wap"];

$json=json_encode($__CONFIG__,JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);

$f=file_put_contents('config/config.json',$json);

if($f){
    return json([
        "code"=>200    
    ]);
}else{
    return json([
        "code"=>-1   
    ]);
}



